/** 
 * @Company: 北京慧点科技有限公司 | www.smartdot.com.cn
 * @Copyright 1998-2022 © Smartdot Technologies Co., Ltd.
 */
package com.hd.rcugrc.project.leaveapplication.annualleave.entity;

import java.io.Serializable;

import javax.persistence.*;

import com.hd.rcugrc.bpm.Operator;
import com.hd.wep.extend.model.annotation.DictDefinition;
import org.hibernate.annotations.GenericGenerator;

import com.hd.wep.extend.common.entity.WeBaseEntity;
import com.hd.wep.extend.model.annotation.DictDefinition;
import com.hd.wep.extend.model.annotation.FieldDefinition;
import com.hd.wep.extend.model.annotation.FormBean;
import com.hd.wep.extend.form.model.annotation.*;
import com.hd.wep.extend.form.model.enums.FieldTypeEnum;

/**
 * 年假维护-实体对象 - 由代码生成器生成
 * 
 * @class: OaOfficeAnnualLeaveEntity
 * @date 2024-07-26 16:12:53
 * @author smartdot
 * @version 1.0 - 2024-07-26 16:12:53
 * @see
 */
@FormBean(formName = "年假维护")
@Entity(name = "com.hd.rcugrc.project.leaveapplication.annualleave.entity.OaOfficeAnnualLeaveEntity")
@Table(name = "xm_njwh_table")
public class OaOfficeAnnualLeaveEntity extends WeBaseEntity implements Serializable {
    /**
     * 序列化ID
     */
    private static final long serialVersionUID = -3856100251268379283L;
    /**
     * 主键
     */
    private Long id;
    /**
     * 用户名
     */
    private Operator[] njwhYhm;
    /**
     * 年份
     */
    private Integer njwhNf;
    /**
     * 应有年假
     */
    private Integer njwhYynj1;
    /**
     * 已用年假
     */
    private Integer njwhYynj2;
    /**
     * 剩余年假
     */
    private Integer njwhSynj;
    /**
     * 被锁定年假
     */
    private Integer njwhBsdnj;
    /**
     * 当前状态
     */
    private String njwhDqzt;
    
    public OaOfficeAnnualLeaveEntity() {
        super();
    }
    
    public OaOfficeAnnualLeaveEntity(OaOfficeAnnualLeaveEntity entity) {
        super(entity);
        this.id = entity.getId();
        this.njwhNf = entity.getNjwhNf();
        this.njwhYynj1 = entity.getNjwhYynj1();
        this.njwhYynj2 = entity.getNjwhYynj2();
        this.njwhSynj = entity.getNjwhSynj();
        this.njwhBsdnj = entity.getNjwhBsdnj();
        this.njwhDqzt = entity.getNjwhDqzt();
    }
    
    /**
     * 获取ID
     * 
     * @return ID
     */
    @Id
    @GeneratedValue(generator = "OaOfficeAnnualLeaveEntityIdGenerator")
    @GenericGenerator(name = "OaOfficeAnnualLeaveEntityIdGenerator", 
            strategy = "com.hd.rcugrc.data.ids.TableBasedLongIdGenerator", parameters = {
            @org.hibernate.annotations.Parameter(name = "table_name", value = "HD_ID_GEN"),
            @org.hibernate.annotations.Parameter(name = "segment_column_name", value = "ID_NAME"),
            @org.hibernate.annotations.Parameter(name = "value_column_name", value = "ID_VAL"),
            @org.hibernate.annotations.Parameter(name = "segment_value", value = "XM_NJWH_TABLE"),
            @org.hibernate.annotations.Parameter(name = "increment_size", value = "1") })
    @Column(name = "ID")
    @IdField(caption = "ID")
    public Long getId() {
        return id;
    }
    
    /**
     * 设置主键
     * 
     * @param id 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取用户名
     *
     * @return 用户名
     */
    @Transient
    @SelectUserField(caption = "用户名")
    public Operator[] getNjwhYhm() {
        return njwhYhm;
    }

    /**
     * 设置用户名
     *
     * @param njwhYhm 用户名
     */
    public void setNjwhYhm(Operator[] njwhYhm) {
        this.njwhYhm = njwhYhm;
    }
    
    /**
     * 获取年份
     * 
     * @return 年份
     */
    @Column(name = "NJWH_NF")
    @NumberField(caption = "年份")
    public Integer getNjwhNf() {
        return njwhNf;
    }
    
    /**
     * 设置年份
     * 
     * @param njwhNf 年份
     */
    public void setNjwhNf(Integer njwhNf) {
        this.njwhNf = njwhNf;
    }
    
    /**
     * 获取应有年假
     * 
     * @return 应有年假
     */
    @Column(name = "NJWH_YYNJ1")
    @NumberField(caption = "应有年假")
    public Integer getNjwhYynj1() {
        return njwhYynj1;
    }
    
    /**
     * 设置应有年假
     * 
     * @param njwhYynj1 应有年假
     */
    public void setNjwhYynj1(Integer njwhYynj1) {
        this.njwhYynj1 = njwhYynj1;
    }
    
    /**
     * 获取已用年假
     * 
     * @return 已用年假
     */
    @Column(name = "NJWH_YYNJ2")
    @NumberField(caption = "已用年假")
    public Integer getNjwhYynj2() {
        return njwhYynj2;
    }
    
    /**
     * 设置已用年假
     * 
     * @param njwhYynj2 已用年假
     */
    public void setNjwhYynj2(Integer njwhYynj2) {
        this.njwhYynj2 = njwhYynj2;
    }
    
    /**
     * 获取剩余年假
     * 
     * @return 剩余年假
     */
    @Column(name = "NJWH_SYNJ")
    @NumberField(caption = "剩余年假")
    public Integer getNjwhSynj() {
        return njwhSynj;
    }
    
    /**
     * 设置剩余年假
     * 
     * @param njwhSynj 剩余年假
     */
    public void setNjwhSynj(Integer njwhSynj) {
        this.njwhSynj = njwhSynj;
    }
    
    /**
     * 获取被锁定年假
     * 
     * @return 被锁定年假
     */
    @Column(name = "NJWH_BSDNJ")
    @NumberField(caption = "被锁定年假")
    public Integer getNjwhBsdnj() {
        return njwhBsdnj;
    }
    
    /**
     * 设置被锁定年假
     * 
     * @param njwhBsdnj 被锁定年假
     */
    public void setNjwhBsdnj(Integer njwhBsdnj) {
        this.njwhBsdnj = njwhBsdnj;
    }

    /**
     * 获取当前状态
     *
     * @return 当前状态
     */
    @Column(name = "NJWH_DQZT")
    @SelectListField(caption = "当前状态", dictId = "", selectListItems = {
            @SelectListItem(label = "启用", value = "启用")
            ,@SelectListItem(label = "停用", value = "停用")
        })
    public String getNjwhDqzt() {
        return njwhDqzt;
    }

    /**
     * 设置当前状态
     *
     * @param njwhDqzt 当前状态
     */
    public void setNjwhDqzt(String njwhDqzt) {
        this.njwhDqzt = njwhDqzt;
    }
}
